package cn.gdsdxy.s06spring;

import cn.gdsdxy.s06spring.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class S06SpringApplication {


    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(S06SpringApplication.class, args);
        String[] beanDefinitionNames = context.getBeanDefinitionNames();
        for(String name:beanDefinitionNames){
            System.out.println(name);
        }
        User user1 = context.getBean(User.class);
        System.out.println(user1);

    }

}
